package com.slg.android.manyanime.bean;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by Darker on 2015/3/10.
 */
public class CoserPicture implements Serializable{

    /**
     * coser 图片的id
     */
    private String id ; // "1343",
    /**
     * 图片的名称
     */
    private String name ; // "百万亚瑟王\n支援型ミココ",
    /**
     * 图片网络地址
     */
    private String pic ; // "http://manhua.tmcdn.net/upload/14259822375",
    private String num ; // "3145",
    private String desc ; // "maron (마론) ",
    /**
     * 图片的宽度
     */
    private String pic_width ; // "484",
    /**
     * 图片的高度
     */
    private String pic_height ; // "726",
    private String comment_num ; // "0",
    private String praise ; // false

    //todo 解析
    public void parseJSON(JSONObject json) {
        if (json != null) {
            try {
                id = json.getString("id");
                name = json.getString("name");
                pic = json.getString("pic");
                num = json.getString("num");
                desc = json.getString("desc");
                pic_width = json.optString("pic_width");
                pic_height = json.optString("pic_height");
                comment_num = json.optString("comment_num");
                praise = json.optString("praise");

            } catch (JSONException e) {
                e.printStackTrace();
            }

        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getPic_width() {
        return pic_width;
    }

    public void setPic_width(String pic_width) {
        this.pic_width = pic_width;
    }

    public String getPic_height() {
        return pic_height;
    }

    public void setPic_height(String pic_height) {
        this.pic_height = pic_height;
    }

    public String getComment_num() {
        return comment_num;
    }

    public void setComment_num(String comment_num) {
        this.comment_num = comment_num;
    }

    public String getPraise() {
        return praise;
    }

    public void setPraise(String praise) {
        this.praise = praise;
    }




}
